package com.mzj.saas.mservice.property.common;

/**
 * @author hikari
 * @since 2021-05-14
 */
public enum RepairsStatusEnum {
    PENDING(0, "待处理"),
    AWAITING_REPAIR(1, "待维修"),
    REPAIRING(2, "维修中"),
    AWAITING_PAY(3, "待缴费"),
    COMPLETED(4, "已完成");

    public final int status;
    public final String statusName;

    RepairsStatusEnum(int status, String statusName) {
        this.status = status;
        this.statusName = statusName;
    }

    public static String getStatusName(int status) {
        for (RepairsStatusEnum value : RepairsStatusEnum.values()) {
            if (value.getStatus() == status) {
                return value.statusName;
            }
        }
        return null;
    }

    public int getStatus() {
        return this.status;
    }
}
